= wrap_layout :layout do
  .container__has-sidebar
    .row
      .main-sidebar
          - if sidebar_layout == 'docs'
            form.main-sidebar--search action="/docs/search/" method="get"
              input type="text" placeholder="Search Documentation" name="q"
          ul.no-bullet
            - sidebar_data(sidebar_layout).each do |item|
              li.main-sidebar--heading
                h4 = item.title
                ul.main-sidebar--list.no-bullet
                  - item.links.each do |item_link|
                    li.main-sidebar--list--item class=link_classes(current_resource.url, item_link)
                      = link_to item_link.title, item_link.link
                      - if print_sub_links?(current_resource.url, item_link)
                        ul.main-sidebar--list--item--dropdown.no-bullet
                          - item_link.sub_links.each do |sub_link|
                            li.main-sidebar--list--item  class=link_classes(current_resource.url, sub_link)
                              = link_to sub_link.title, sub_link.link

      .main-content__has-sidebar
          == yield
